package com.leyou.configuration;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*配置类*/
@Configuration
public class OSSConfig {

    @Bean
    public OSS ossCient(OSSProperties prop){
        return new OSSClientBuilder().build(
                prop.getEndpoint(),
                prop.getAccessKeyId(),
                prop.getAccessKeySecret());
    }
}
